<div id="cart_contents" class="myexperiment_gadget" style="border:3px solid #1B619B;">
  <b class="xtop" style="background-color: #ACCBE0;"><b class="xb1" style="background-color: #ACCBE0;"></b><b class="xb2" style="background-color: #ACCBE0;"></b><b class="xb3" style="background-color: #ACCBE0;"></b><b class="xb4" style="background-color: #ACCBE0;"></b></b>

  <div class="header" style="padding-bottom: 0.8em; background-color: #ACCBE0; background-image: none;">Variable cart</div>
  <div class="contents">

    <div class="fold">
      <div class="foldTitle"><em style="margin:auto"><%= image_tag("famfamfam_silk/cart.png", :border => 0) -%></em></div>
      <div class="foldContent" style="display:none;padding:0;">
        <% form_remote_tag :url => { :action => "deal_with_selected", :controller => "cart"},:name=>'submitter' ,:loading => "$('archive_linker').hide();$('download_selected').disable();$('remove_selected').disable();$('send_message').disable();$('csv_download_spinner').show();",:loaded => "$('archive_linker').show();$('send_message').enable();$('download_selected').enable();$('remove_selected').enable();$('csv_download_spinner').hide();" do -%>
          <div id="cart-contents-inner" style="text-align:left;">
            <%= render(:partial => "surveys/cart_item") %>
          </div>
          <%= hidden_field_tag 'update_button', 'Download' %>
  <%#= submit_tag('Create CSV Archive', {:id=>"download_selected", :name=>'_update_button', :onclick => "Form.getInputs(this.form, null, 'update_button')[0].value = 'Download'"})%>
          <%= submit_tag('Remove selected', {:id=>"remove_selected", :name=>'_update_button', :onclick => "Form.getInputs(this.form, null, 'update_button')[0].value = 'Remove'"})%>
        <% end %>
      </div>
      <div id="cart-total">
        <%= render(:partial => "surveys/cart_total") %>
      </div>
      <%= button_to_remote "Empty cart", :url => { :action => "empty_cart"} %>
<%#= button_to_remote "Download all", :id => "download_all", :loading => "$('csv_download_spinner').show();$('download_all').disable", :loaded => "$('csv_download_spinner').hide();$('download_all').enable", :url => { :action => "download_all_variables"} %>
<%#*<div id="download_button_partial">%>
<%#= render(:partial => "surveys/download_button") %>
<%#*</div>%>


      <% form_remote_tag :id => "download_all", :loading => "$('archive_linker').hide();$('send_message').value = 'Creating CSV file...';$('send_message').disable();$('csv_download_spinner').show();",:loaded => "$('archive_linker').show();$('send_message').value = 'Create CSV Archive';$('send_message').enable();$('csv_download_spinner').hide();", :url => { :action => "download_all_variables", :controller => "cart"} do -%>

  <%#*<img alt="spinner" id="spinner2" src="/images/spinner.gif" style="display:none;vertical-align:middle;" />%>
        <%= submit_tag('Create CSV Archive', :name=>'send_message_button', :id=>"send_message") -%>
      <% end -%>

      <%= image_tag method_to_icon_filename("spinner"), :id => "csv_download_spinner", :alt=>"loading...", :title=>"loading...", :style => "display: none; vertical-align: middle;" -%>


      <div id="archive_linker"/>
      <div id="progress_bar"/>

    </div>
  </div>
</div>

</div>
</div>
